A t-test is the comparison
of average values between two groups.
For example, you could be comparing whether teaching
evaluations of male instructors
is the same for female instructors.
You can either assume that the variance or
standard deviation is equal or unequal.
How do we determine this?
We have the teaching evaluation data.
We calculated the average teaching evaluation
for female instructors to be
3.9 with a standard deviation of 0.53.
The average teaching evaluations for
male instructors on the other hand,
was calculated as 4.06 with a standard deviation of 0.55.
When we conduct a t-test,
we are faced with whether to assume
equal or unequal variances.
We have a t-test called
Levene's test to determine the equality of variances.
The null hypothesis of
the Levene's test is that population variances
are equal if the p-value of the test is less 0.05,
reject the null hypothesis of
equal variances and assume
that the variances are unequal.
Let us look at the example for that of teaching
evaluation scores for male and female instructors.
We will use the Levene's function
in the psi pi.stats package.
We will run it against both samples and we will
specify the center argument as mean.
Since our t-tests, we test for mean differences,
we will get a p-value of 0.66,
which is greater than 0.05.
That means we will fail to reject
the null hypothesis and we will assume
equal variances when conducting our t-test.
When you run your t-test,
you set the equal underscore var option to
true and if you got a p-value less than 0.05,
you set that option to false.
If you were to do a t-test by hand,
the formula would be different for
calculating equal versus unequal variances.
You must calculate the pooled variance as shown here.
Then calculate the standard deviation
that you will use in the t-test.
If the variances were unequal,
calculate the t-test with each of
the individual standard deviations and sample size.
You will need to find the degree of
freedom to check the t-test table.
With this formula the rule of thumb for
assuming equal variance when calculating by hand,
is defined by the ratio of the larger groups
variance to the smaller groups
variance to be less than 1.5.